﻿using System.ServiceModel;
using System.ServiceModel.Web;
using CoreLibrary.Service;
using Modules.API;
using WebService.Service.Transfer;

namespace WebService.Service {

    [ServiceContract]
    public interface ICalculateServiceX {

        [OperationContract]
        [FaultContract(typeof(ServiceError))]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest,
            RequestFormat    = WebMessageFormat.Json,
            ResponseFormat   = WebMessageFormat.Json,
            UriTemplate      = "/Calculate")]
        CalculateResponse Calculate(string passport);


        [OperationContract]
        [FaultContract(typeof(ServiceError))]
        [WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest,
            RequestFormat  = WebMessageFormat.Json,
            ResponseFormat = WebMessageFormat.Json,
            UriTemplate    = "/GetExchangeRate")]
        SearchCurrencyResult GetExchangeRate(string passport, SearchCurrencyRequest request);
    }
}
